﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="RedBalLoansDetailProjectionReport.aspx.cs" Inherits="Reports_RedBalLoansDetailProjectionReport" %>

<%@ Register TagPrefix="ln" Namespace="Web.UI.CustomControls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <link rel="Stylesheet" href="../Styles/MessageBoxes.css" type="text/css" />
    <style type="text/css">
        .detailedReportContainer
        {
            margin-bottom: 20px;
        }
        .gridviewPager
        {
            margin-top: 15px;
            margin-bottom: 20px;
            width: 650px;
            margin-left: auto;
            margin-right: auto;
        }
        .gvDetailedReport th
        {
            border-bottom: 2px solid #666666 !important;
        }
        .table tbody tr:hover td, .table tbody tr:hover th
        {
            background-color: #98AFC7;
        }
        
        .prevnext-div{}
        .pageinput-div{margin-left:30px;}
        .pagesize-div{margin-left:30px;}
        .gotobutton-div{margin-left:30px;}
        .buttonnext-div{margin-left:15px;}
        .pageinputseperator-div{margin-left:5px;margin-right:5px}
        .exporttoexcelbutton-div{}
        .exporttools-div{padding-left:50px;padding-right:50px}
        
        .detailedReportContainer{margin-left:0px !important;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="container span9">
        <div class="well">
            <fieldset>
                <legend>Reducing Balance Loans Detailed Interest Projection Report</legend>
                <div class="control-group">
                    <asp:Label AssociatedControlID="txtFromReportDate" CssClass="control-label" ID="lblTermDate"
                        runat="server" Text="From Month"></asp:Label>
                    <div class="controls">
                        <div class="input-append date" runat="server" id="fromReportDateContainer">
                            <input id="txtFromReportDate" runat="server" class="span2" readonly />
                            <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label AssociatedControlID="txtToReportDate" CssClass="control-label" ID="Label2"
                        runat="server" Text="To Month"></asp:Label>
                    <div class="controls">
                        <div class="input-append date" runat="server" id="toReportDateContainer">
                            <input id="txtToReportDate" runat="server" class="span2" readonly />
                            <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div id="defaultInterestControlGroup" runat="server" class="control-group">
                    <div class="controls">
                    </div>
                </div>
                <div class="controls">
                    <asp:Button ID="btnRunReport" runat="server" CssClass="btn btn-primary" OnClick="btnRunReport_Click"
                        Text="Run Report" />
                </div>
            </fieldset>
        </div>
        <div class="control-group">
            <div class="error" id="errorMessage" runat="server" visible="false">
            </div>
        </div>
        <div id="detailedReportContainer" runat="server" style="display: none;" class="detailedReportContainer well span11">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <Triggers>
                <asp:PostBackTrigger ControlID="btnExportToExcel" />
            </Triggers>
                <ContentTemplate>
                    <div id="grid" style="overflow: scroll;">
                        <asp:GridView ID="gvDetailedReport" runat="server" CellPadding="4" ForeColor="#333333"
                            GridLines="None" Height="185px" OnRowDataBound="gvDetailedReport_RowDataBound"
                            OnDataBound="gvDetailedReport_DataBound" CssClass="table table-hover gvDetailedReport">
                            <EditRowStyle BackColor="#999999" />
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#E9E7E2" />
                            <SortedAscendingHeaderStyle BackColor="#506C8C" />
                            <SortedDescendingCellStyle BackColor="#FFFDF8" />
                            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                        </asp:GridView>
                    </div>
                    <div>
                        <div class="text-center">
                            <div id="gridviewPager" class="gridviewPager clearfix" runat="server">
                                <div class="pull-left prevnext-div">
                                    <div class="pull-left buttonprev-div">
                                        <asp:Button ID="btnPevious" runat="server" OnClick="btnPevious_Click" Text="&lt;&lt; prev"
                                        CssClass="btn btn-mini btn-inverse" />
                                    </div>
                                    <div class="pull-left buttonnext-div">
                                        <asp:Button ID="btnNext" runat="server" OnClick="btnNext_Click" Text="next &gt;&gt;" CssClass="btn btn-mini btn-inverse" />
                                    </div>
                                </div>
                                <div class="pull-left pageinput-div">
                                    <div class="pull-left">
                                        <asp:TextBox ID="txtCurrentPage" runat="server" Width="40px" Height="15px"></asp:TextBox>
                                    </div>
                                    <div class="pull-left pageinputseperator-div">
                                        <asp:Label ID="label1" runat="server" Text="of"></asp:Label>
                                    </div>
                                    <div class="pull-left">
                                        <asp:TextBox ID="txtTotalPages" runat="server" Width="40px" Height="15px" ReadOnly="True"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="pull-left gotobutton-div">
                                    <asp:Button ID="btnGotoPage" runat="server" OnClick="btnGotoPage_Click" CssClass="btn btn-mini btn-inverse"
                                    Text="Goto Page" />
                                </div>
                                <div class="pull-left pagesize-div">
                                    <asp:Label ID="lblPageSize" runat="server" Text="Page Size:" CssClass=""></asp:Label>
                                    <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged"
                                        Height="25px" Width="80px">
                                        <asp:ListItem>25</asp:ListItem>
                                        <asp:ListItem>50</asp:ListItem>
                                        <asp:ListItem>100</asp:ListItem>
                                        <asp:ListItem>500</asp:ListItem>
                                        <asp:ListItem>1000</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div>
                                <asp:RangeValidator ID="rvPageIndex" runat="server" ControlToValidate="txtCurrentPage"
                                ErrorMessage="page number invalid"  ForeColor="Red" MaximumValue="99999" MinimumValue="1"
                                SetFocusOnError="True" Display="Dynamic" ToolTip="page number to display" Type="Integer"></asp:RangeValidator>
                            </div>
                        </div>
                        <div class="clearfix exporttools-div">
                            <div class="pull-right exporttoexcelbutton-div">
                                <asp:Button ID="btnExportToExcel" runat="server" 
                                    CssClass="btn btn-mini btn-inverse" Text="Export to Excel" 
                                    onclick="btnExportToExcel_Click" /> 
                            </div>                           
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="EndScriptsPlaceHolder" runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=fromReportDateContainer.ClientID%>").datepicker({ format: 'dd-mm-yyyy', autoclose: true, todayBtn: true });
            $("#<%=toReportDateContainer.ClientID%>").datepicker({ format: 'dd-mm-yyyy', autoclose: true, todayBtn: true });
        });
    </script>
</asp:Content>
